import _3d from "../../_3d.js"


import CssRenderer from "./CssRenderer.js"
import Composer from './Composer.js'



const obj = {
   
    cssRenderer(type)  {
        if(type === '2d') {
            this.single.css2dRenderer = this.single.css2dRenderer ? this.single.css2dRenderer :  (this.single.css2dRenderer = new CssRenderer( _3d.CSS2DRenderer, _3d.CSS2DObject, this))
            return this.single.css2dRenderer
        }else if(type === '3d') {
            this.single.css3dRenderer = this.single.css3dRenderer ? this.single.css3dRenderer :  (this.single.css3dRenderer = new CssRenderer( _3d.CSS3DRenderer, _3d.CSS3DObject, this))
            return this.single.css3dRenderer
        } 
    },
    
    composer(option) {
        return new Composer(option, this)
    },
}

export default obj
